<?php
abstract class Animal {
	abstract function say();
}
class Dog extends Animal {
	function say() {
		echo "小狗汪汪叫";
	}
}
class Cat extends Animal {
	function say() {
		echo "小猫喵喵叫";
	}
}
class A {
	function say() {
		echo "嗷嗷叫";
	}
}

class User {
	static function zhiling(Animal $obj) {
		$obj -> say();
	}
}

$erha = new Dog();
$xiaohua = new Cat();
$a=new A();
User::zhiling($erha);
User::zhiling($xiaohua);
//User::zhiling($a);
?>